package flc.ast.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.os.Handler;

import com.blankj.utilcode.util.ToastUtils;

import java.util.Random;

import flc.ast.BaseAc;
import flc.ast.R;
import flc.ast.databinding.ActivityFileClearBinding;

public class FileClearActivity extends BaseAc<ActivityFileClearBinding> {


    @Override
    protected int onCreate() {
        return R.layout.activity_file_clear;
    }

    @Override
    protected void initView() {
        mDataBinding.ivFileClearBack.setOnClickListener(v -> onBackPressed());
    }

    @Override
    protected void initData() {
        Random random = new Random();
        mDataBinding.tvPercent.setText(random.nextInt(50) + getString(R.string.unit_percent));
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                mDataBinding.tvPercent.setText(getString(R.string.file_clear_suc));
                mDataBinding.ivFileClearImg3.setImageResource(R.drawable.agou);
                mDataBinding.ivFileClearImg4.setImageResource(R.drawable.agou);
            }
        }, 1000);
    }
}